-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Release 15.0.0 #138
Release 15.0.0 #138
Conversation
…stead of calling to all endpoints
…o corresponding nodes using node indexes
ed25519 keys support and import keys new flow
src/helpers/common.ts
Outdated
|
||
export const ed25519Curve = new EC("ed25519"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
define this inside the function for better tree shaking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/helpers/keyUtils.ts
Outdated
const publicKey = key.getPublic().encode("hex", false).slice(2); | ||
const evmAddressLower = `0x${keccak256(Buffer.from(publicKey, "hex")).slice(64 - 38)}`; | ||
return toChecksumAddress(evmAddressLower); | ||
if (keyType === "secp256k1") { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use enum for curve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
src/helpers/keyUtils.ts
Outdated
return ecCurve.keyFromPrivate(skHex).getPublic(); | ||
} | ||
|
||
export const encryptionEC = new EC("secp256k1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pls don't define exportable variables. not good for treeshaking
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
refactor: add types for extra params
minor refactor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
No description provided.